﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WizardSample;


namespace WizardSampleTests
{
    [TestClass]
    public class MianWindowTests
    {
        [TestMethod]
        public void CreateStep_Returns_NotNull()
        {
            //arrange
            MainWindow window = new MainWindow();
            System.Windows.Controls.UserControl control = null;
            //act
            control=  window.CreateStep(1);

            //assert
            Assert.IsNotNull(control);
        }

        [TestMethod]
        public void CreateStep_ReturnsStepOne_WhenPassedZero()
        {
            //arrange
            MainWindow window = new MainWindow();
            System.Windows.Controls.UserControl control = null;
            //act
            control = window.CreateStep(0);
            Type type= control.GetType();

            //assert
            Assert.AreEqual(type.Name, "StepOne");
        }

        [TestMethod]
        public void CreateStep_ReturnsStepTwo_WhenPassedOne()
        {
            //arrange
            MainWindow window = new MainWindow();
            System.Windows.Controls.UserControl control = null;
            //act
            control = window.CreateStep(1);
            Type type = control.GetType();

            //assert
            Assert.AreEqual(type.Name, "StepTwo");
        }
    }
}
